/**
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../styles/variables';

.card {
  position: relative;
  width: 100%;
  max-width: 556px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  border-radius: 4px;
  padding: 16px;
  background: $light_orange;
  border: 1px solid $highlight_guess;

  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.35s ease-in-out, transform 0.35s ease-in;
  transition-delay: 0.65s, 0.65s;

  @media screen and (min-width: $desktop) {
    transform: translateY(100%);
  }

  &.show {
    opacity: 1;
    transform: translateY(0%);
    transition: opacity 0.25s ease-in-out,
      transform 0.5s cubic-bezier(0.42, 1.62, 0.51, 1.02);
    transition-delay: 0s, 0s;

    .container {
      .word {
        @for $i from 1 through 5 {
          span:nth-child(#{$i}) {
            opacity: 1;
            transform: translateY(0px);
            transition: opacity 0.25s ease-in-out,
              transform 0.4s cubic-bezier(0.42, 1.62, 0.51, 1.02);
            transition-delay: #{0.35 + $i * 0.15}s;
          }
        }
      }
      .disallowedWords {
        @for $i from 1 through 10 {
          span:nth-child(#{$i}) {
            opacity: 1;
            transform: translateY(0px);
            transition: opacity 0.25s ease-in-out,
              transform 0.4s cubic-bezier(0.42, 1.62, 0.51, 1.02);
            transition-delay: #{0.85 + $i * 0.15}s;
          }
        }
      }
    }
  }

  .container {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;

    & > span {
      font-size: 12px;
      font-weight: 500;
      line-height: 12px;
      color: $orange;
      margin-bottom: 4px;

      @media screen and (min-width: $desktop) {
        font-size: 14px;
        line-height: 1;
      }
    }

    div {
      font-size: 18px;
      font-weight: 700;
      line-height: 23.4px;
      color: $dark_orange;
      padding-bottom: 4px;

      @media screen and (min-width: $desktop) and (min-height: $height_xl) {
        font-size: 28px;
        line-height: 130%;
      }

      @media screen and (min-width: $desktop) {
      }

      span {
        display: inline-block;
        position: relative;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity 0, transform 0;
        transition-delay: 10s;
      }
    }
  }
}
